<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf Mall.
 *
 * @link     https://gitee.com/scwlkj/hypref_mall
 * contact  hyperf_mall@163.com
 */
namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

/**
 * @Constants
 */
class Message extends AbstractConstants
{
    /**
     * @Message("订单通知")
     */
    public const SEND_TYPE_ORDER = 1;

    /**
     * @Message("系统通知")
     */
    public const SEND_TYPE_SYSTEM = 0;


    const MS_NOT_READ = 0;   //未读
    const MS_READ = 1;   //已读

    const MS_CREATE_ORDER = 1; // 下单（生成订单）
    const MS_ORDER_CANCEL = 2; // 取消订单
    const MS_ORDER_PAY = 3; // 支付成功
    const MS_ORDER_DELIVERY = 4; // 发货
    const MS_ORDER_CONFIRM = 5; // 订单确认收货（签收）
    const MS_ORDER_EVALUATE = 6; // 评价成功
    const MS_ORDER_FINISH = 7; // 订单完成
    const MS_ORDER_REFUND = 8; // 退款
    const MS_ORDER_REFUND_PASS = 9; // 订单退款同意
    const MS_ORDER_REFUND_REJECT = 10; // 订单退款驳回
    const MS_ORDER_REFUND_CANCEL = 11; // 订单退款取消
    const MS_ORDER_REFUND_FINISH = 12; // 订单退款完成

    public static array $type_msg = [
        self::MS_CREATE_ORDER=>'创建订单通知',
        self::MS_ORDER_CANCEL=>'订单取消通知',
        self::MS_ORDER_PAY=>'订单支付成功通知',
        self::MS_ORDER_DELIVERY=>'订单发货通知',
        self::MS_ORDER_CONFIRM=>'订单收货通知',
        self::MS_ORDER_EVALUATE=>'评价成功通知',
        self::MS_ORDER_FINISH=>'订单完成通知',
        self::MS_ORDER_REFUND=>'售后订单通知',
        self::MS_ORDER_REFUND_PASS=>'订单同意退款通知',
        self::MS_ORDER_REFUND_REJECT=>'订单退款驳回通知',
        self::MS_ORDER_REFUND_CANCEL=>'订单退款取消通知',
        self::MS_ORDER_REFUND_FINISH=>'订单退款完成通知',

        self::MS_POINT_ADD=>'积分变动通知',
        self::MS_POINT_DESC=>'积分变动通知',
    ];

    const MS_POINT_ADD = 20; // 积分增加
    const MS_POINT_DESC = 21; // 积分减少

}
